
export const delay = async (ms: number) => {
    return new Promise((resolve, _) => {
        setTimeout(resolve, ms);
    });
}

export const parseUtf8 = (buf: number[]) => {
    const decoder = new TextDecoder('utf8');
    return decoder.decode( Uint8Array.from(buf) )
}

